package com.yc.forum.servlet;

import com.yc.forum.dao.ClassifyDao;
import com.yc.forum.util.Utils;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;
import java.util.Map;

//查询帖子（问题）的分类
@WebServlet(name = "QueryClassifyServlet", value = "/QueryClassify.s")
public class QueryClassifyServlet extends HttpServlet {
    private ClassifyDao classifydao=new ClassifyDao();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        List<Map<String,Object>> list=classifydao.selectClassify();
        Utils.toJson(list,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
